<?php

class Junction_Property {
	
	private $_name;
	
	private $_field;
	
	public function __construct($name, $field) {
		$this->_name = $name;
		$this->_field = (isset($field)) ? $field : $name;
	}
	
	/**
	 * Name of the property as referenced by the database
	 *
	 * @return String
	 */
	public function toSql() {
		return $this->_field;
	}
	
	/**
	 * Name of the property as referenced by the application
	 *
	 * @return String
	 */
	public function __toString() {
		return $this->_name;
	}
}
?>